import { createApp } from 'vue'
import App from './App.vue'

import router from './router/index'
import store from './store/index'
import { setupStore } from './store/index'

// 按需引入 element-plus
import { registerApp } from './global/index'
// 还是全局引入把，太懒了
import 'element-plus/dist/index.css'
import ELementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'

// 引入公共样式
import './assets/css/index.less'

const app = createApp(App)
app.use(ELementPlus, {
  locale: zhCn
})
// registerApp(app)
app.use(registerApp)
setupStore()
app.use(router)
app.use(store)
// debugger
app.mount('#app')

// 环境变量
// console.log(process.env.NODE_ENV)
